import request from "@/utils/request";
export default {
  //查询课程的列表
  getCourseList() {
    return request({
      url: `/eduservice/course/getCourse`,
      method: "get"
    });
  },
  //删除课程列表的信息
  delCourse(courseId){
    return request({
      url: `/eduservice/course/deleteCourse/${courseId}`,
      method: "delete"
    });
  },
  // *******************************************
  //1 添加课程信息
  addCourseInfo(courseInfo) {
    return request({
      url: "/eduservice/course/addcourse",
      method: "post",
      data: courseInfo
    });
  },
  //修改课程信息
  updateCourseInfo(courseInfoVo) {
    return request({
      url: `/eduservice/course/updateCourseInfo`,
      method: "post",
      data: courseInfoVo
    });
  },
  //2 查询所有讲师
  getListTeacher() {
    return request({
      url: "/eduservice/findAll",
      method: "get"
    });
  },
  //根据课程的Id查询课程的基本信息
  getCourseInfoId(courseId) {
    return request({
      url: `/eduservice/course/getCourseInfo/${courseId}`,
      method: "get"
    });
  },
  //课程确认信息的显示
  getPlushInfo(courseId) {
    return request({
      url: `/eduservice/course/getpublishId/${courseId}`,
      method: "get"
    });
  },
  //最后课程确认发布
  updatePublish(courseId) {
    return request({
      url: `/eduservice/course/updatePublish/${courseId}`,
      method: "post"
    });
  }
};
